package cn.zhangchg.leetcode.object;

import org.openjdk.jol.info.ClassLayout;

public class JustTest {
    private static class T{

    }

    private static class T2{
        int a;
    }
    private static class T3{
        int a;
        int b;
    }
    private static class T4{
        int a;
        int b;
        boolean c;
    }
    private static class T5{
        int a;
        int b;
        boolean c;
        String d = "hello";
    }

    public static void main(String[] args) {
        //-XX:-UseCompressedClassPointers -XX:-UseCompressedOops
        T[] ts = {new T()};
        System.out.println(ClassLayout.parseInstance(new T()).toPrintable());
        System.out.println(ClassLayout.parseInstance(ts).toPrintable());
        System.out.println(ClassLayout.parseInstance(new T2()).toPrintable());
        System.out.println(ClassLayout.parseInstance(new T3()).toPrintable());
        System.out.println(ClassLayout.parseInstance(new T4()).toPrintable());
        System.out.println(ClassLayout.parseInstance(new T5()).toPrintable());
    }
}
